home *** CD-ROM | disk | FTP | other *** search
- //--------------------------------------------------------------------------
- //
- // Copyright (c) 2002, Colin Granville
- //
- // All rights reserved.
- //
- // Redistribution and use in source and binary forms, with or
- // without modification, are permitted provided that the following
- // conditions are met:
- //
- // * Redistributions of source code must retain the above copyright
- // notice, this list of conditions and the following disclaimer.
- //
- // * Redistributions in binary form must reproduce the above
- // copyright notice, this list of conditions and the following
- // disclaimer in the documentation and/or other materials
- // provided with the distribution.
- //
- // * The name Colin Granville may not be used to endorse or promote
- // products derived from this software without specific prior
- // written permission.
- //
- // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- // COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- // OF THE POSSIBILITY OF SUCH DAMAGE.
- //
- //--------------------------------------------------------------------------
-
- #ifndef GuiToolbox_h
- #define GuiToolbox_h
-
- class GuiMessagesFD
- {
- public:
- int data [4];
- };
-
- struct GuiToolboxEventHeader
- {
- unsigned int size;
- int referenceNumber;
- unsigned int eventCode;
- unsigned int flags;
- };
-
- struct GuiToolboxEvent : public GuiToolboxEventHeader
- {
- union
- {
- char bytes [236-sizeof(GuiToolboxEventHeader)];
- int words [(236-sizeof(GuiToolboxEventHeader))/sizeof(int)];
- } data;
- };
-
- typedef int GuiObjectId; // abstract Object Id (as used by client apps)
- typedef int GuiComponentId; // component Id within an Object (eg gadget in Window)
-
- #define NULL_GuiObjectId (GuiObjectId)0
- #define NULL_GuiComponentId (GuiComponentId)-1
-
- class GuiIdBlock
- {
- public:
- struct
- {
- GuiObjectId id;
- GuiComponentId component;
- } ancestor,
- parent,
- self;
- };
-
-
- #define GuiToolbox_SWIChunkBase 0x44ec0
-
- #ifndef Toolbox_CreateObject
- #define Toolbox_CreateObject (GuiToolbox_SWIChunkBase + 0)
- #define Toolbox_DeleteObject (GuiToolbox_SWIChunkBase + 1)
- #define Toolbox_ShowObject (GuiToolbox_SWIChunkBase + 3)
- #define Toolbox_HideObject (GuiToolbox_SWIChunkBase + 4)
- #define Toolbox_GetObjectState (GuiToolbox_SWIChunkBase + 5)
- #define Toolbox_ObjectMiscOp (GuiToolbox_SWIChunkBase + 6)
- #define Toolbox_RaiseToolboxEvent (GuiToolbox_SWIChunkBase + 13)
- #define Toolbox_GetSysInfo (GuiToolbox_SWIChunkBase + 14)
- #define Toolbox_Initialise (GuiToolbox_SWIChunkBase + 15)
- #endif
-
- //****************************************************************************
- // Toolbox Events
- // ***************************************************************************
-
-
- struct GuiToolbox
- {
- struct Error : public GuiToolboxEventHeader
- {
- enum {Event = GuiToolbox_SWIChunkBase + 0};
- int errnum;
- char errmess [sizeof(GuiToolboxEvent)-sizeof(GuiToolboxEventHeader)-
- sizeof(GuiObjectId)-
- sizeof(GuiComponentId)-
- sizeof(int)];
- };
-
- };
-
- #endif
-